home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / wais / ui / config.h < prev    next >
C/C++ Source or Header  |  1995-05-09  |  5KB  |  110 lines

  1. /* ********************************************************************** *\
  2.  *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
  3. ############################################################################
  4. #        Copyright IBM Corporation 1988, 1991 - All Rights Reserved        #
  5. #                                                                          #
  6. # Permission to use, copy, modify, and distribute this software and its    #
  7. # documentation for any purpose and without fee is hereby granted,         #
  8. # provided that the above copyright notice appear in all copies and        #
  9. # that both that copyright notice and this permission notice appear in     #
  10. # supporting documentation, and that the name of IBM not be used in        #
  11. # advertising or publicity pertaining to distribution of the software      #
  12. # without specific, written prior permission.                              #
  13. #                                                                          #
  14. # IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL #
  15. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL IBM #
  16. # BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY      #
  17. # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER  #
  18. # IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING   #
  19. # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.    #
  20. ############################################################################
  21. \* ********************************************************************** */
  22. /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v 2.26 1991/09/12 20:35:54 bobg Exp $ */
  23. /* $ACIS: $ */
  24. /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v $ */
  25.  
  26. #ifndef _UTIL_H_
  27. #define _UTIL_H_ 1
  28. #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
  29. static char    *rcsid_h = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v 2.26 1991/09/12 20:35:54 bobg Exp $ ";
  30.  
  31. #endif                                 /* !defined(lint) && !defined(LOCORE)
  32.                                         * && defined(RCS_HDRS) */
  33.  
  34. /* ************************************************************ *\
  35.  
  36.         Declarations for miscellaneous routines in libutil.a
  37.         $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R5/ftp/src/overhead/util/hdrs/RCS/util.h,v 2.26 1991/09/12 20:35:54 bobg Exp $
  38.  
  39. \* ************************************************************ */
  40.  
  41. extern int getpty();            /* opens up both ends of a pty */
  42.  
  43. /* Real backwards compatibility. */
  44. #define getvuid getuid
  45. #define getvpwuid getpwuid
  46. #define getvpwnam getpwnam
  47. #define getvpwent getpwent
  48. #define setvpwent setpwent
  49. #define endvpwent endpwent
  50. #define getcpwuid(X, Y) getpwuid(X)
  51. #define getcpwnam(X, Y) getpwnam(X)
  52. #define cpw_error errno
  53.  
  54. extern char     FoldTRT[256];
  55.  
  56. #define FOLDEDEQ(s1,s2) (FoldTRT[s1[0]]==FoldTRT[s2[0]] && FoldedEQ(s1,s2))
  57. #define FOLDEDEQN(s1,s2,n) (n <= 0 || (FoldTRT[s1[0]]==FoldTRT[s2[0]] && FoldedEQn(s1,s2,n)))
  58.  
  59. extern char    *gethome(), *getMyHome();
  60.  
  61. extern int GetHostDomainName();    /* works like gethostname() but extends with getdomainname() if necessary. */
  62.  
  63. struct configurelist {
  64.     char           *programName;
  65.     char           *key;
  66.     char           *value;
  67.     struct configurelist *next;
  68. };
  69.  
  70. #define CONFIG_EOF -1
  71. #define CONFIG_FOUNDENTRY 0
  72. #define CONFIG_BADENTRY 1
  73. #define CONFIG_COMMENT 2
  74. #define CONFIG_FALSECONDITION 3
  75. #define CONFIG_EMPTYLINE 4
  76. #define CONFIG_NOKEY 5
  77. #define CONFIG_NOVALUE 6
  78.  
  79. extern int      ReadConfigureLine();   /* Reads a line from a file in
  80.                                         * configure file format - returns one
  81.                                         * of the above values */
  82. extern struct configurelist *ReadConfigureFile();       /* reads a configure
  83.                                                          * file given by
  84.                                                          * filename */
  85. extern char    *GetConfig();           /* returns the value corresponding to a
  86.                                         * key for a given configurelist */
  87. extern char    *GetConfiguration();    /* returns the value for a key in the
  88.                                         * AndrewSetup file */
  89. extern          FreeConfigureList();   /* frees a configure list */
  90.  
  91. extern char    *getprofile(), *getprofilestring();
  92. extern int      getprofileint(), getprofileswitch();
  93. extern char    *GetProfileFileName();
  94. extern char    *GetFirstProfileFileName();
  95. extern          refreshprofile();
  96.  
  97. extern          setprofilestring();
  98.  
  99. /* special additions to repair the fact
  100.  * that this was ripped wholesale out of the ATK
  101.  */
  102.  
  103. #define SYS_NAME "i386"
  104. #define OPSYSNAME "SCOi386"
  105.  
  106. #define GetHostDomainName(a,b) gethostname((a),(b))
  107.  
  108. #include "futil.h"
  109. #endif /* _UTIL_H_ */
  110.